$(function(){
	class Activity{
		constructor(){
			this.init();
			this.load();
			
		}
		init(){//选项卡效果
			var $title=$(".title").children()
			var $table=$(".table").children()
			$title.mouseenter(function(){
				$(this).css({
					"background":"#31428a",
				})
				.siblings().css({
					"background":"",
				})
				$(this).parent().siblings(".table").children().eq($(this).index()) 
				.css("display","block").siblings().css("display","none")
			})
		}
		/*划过图片出现下拉条*/
		load(){
			var $table=$(".table").children().children()
			$table.mouseenter(function(){
				$(this).children("h3").animate({
					"top":307
				},500).show()
				$(this).children("img").css({
					"width":250,
					"height":250,
					"top":-10,
					"left":-10
				})
			})
			$table.mouseleave(function(){
				$(this).children("h3").animate({
					"top":397
				},500).hide(10)
				$(this).children("img").css({
					"width":220,
					"height":220,
					"top":0,
					"left":0
				})
			})
		}
		
		
	}
	return new Activity() 
})
